package com.feige.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author feige
 * @since 2020-10-23
 */
@ApiModel(value="User对象", description="用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ExcelIgnore
    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ExcelProperty(value = "学号")
    @ApiModelProperty(value = "学号")
    private String num;

    @ExcelProperty(value = "用户名")
    @ApiModelProperty(value = "用户名")
    private String username;

    @ExcelProperty(value = "性别（1男0女）")
    @ApiModelProperty(value = "性别(1男0女)")
    private Integer sex;

    @ExcelIgnore
    @ApiModelProperty(value = "头像")
    private String avatar;

    @JsonIgnore
    @ExcelIgnore
    @ApiModelProperty(value = "密码")
    private String password;

    @ExcelProperty(value = "昵称")
    @ApiModelProperty(value = "昵称")
    private String nickname;

    @ExcelProperty(value = "电话号码")
    @ApiModelProperty(value = "电话号码")
    private String phoneNumber;

    @ExcelProperty(value = "邮箱")
    @ApiModelProperty(value = "邮箱")
    private String email;

    @ExcelProperty(value = "部门ID")
    @ApiModelProperty(value = "部门ID")
    private Long deptId;

    @ExcelIgnore
    @ApiModelProperty(value = "所管理的部门ID")
    private String manageDeptIds;

    @ExcelIgnore
    @ApiModelProperty(value = "状态(1正常0停用)")
    private Integer status;

    @ExcelProperty(value = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @ExcelIgnore
    @ApiModelProperty(value = "逻辑删除（1（true）删除，0（false）保留）")
    @TableLogic
    private Integer isDelete;

    @ExcelIgnore
    @ApiModelProperty(value = "创建者")
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @ExcelIgnore
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ExcelIgnore
    @ApiModelProperty(value = "修改者")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String modifyBy;

    @ExcelIgnore
    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public String getManageDeptIds() {
        return manageDeptIds;
    }

    public void setManageDeptIds(String manageDeptIds) {
        this.manageDeptIds = manageDeptIds;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public String getModifyBy() {
        return modifyBy;
    }

    public void setModifyBy(String modifyBy) {
        this.modifyBy = modifyBy;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", num='" + num + '\'' +
                ", username='" + username + '\'' +
                ", sex=" + sex +
                ", avatar='" + avatar + '\'' +
                ", password='" + password + '\'' +
                ", nickname='" + nickname + '\'' +
                ", phoneNumber='" + phoneNumber + '\'' +
                ", email='" + email + '\'' +
                ", deptId='" + deptId + '\'' +
                ", status=" + status +
                ", remark='" + remark + '\'' +
                ", isDelete=" + isDelete +
                ", createBy='" + createBy + '\'' +
                ", gmtCreate=" + gmtCreate +
                ", modifyBy='" + modifyBy + '\'' +
                ", gmtModified=" + gmtModified +
                '}';
    }
}
